<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const info = {
        name: "jack",
        age: 20,
      };

      const user = {};
      // 获取源对象属性标志
      const i = Object.getOwnPropertyDescriptors(info);
      // 基于源对象的属性标志生成新对象（复制）
      Object.defineProperties(user, i);

      console.log(user, info, user === info);

      // const user = JSON.parse(JSON.stringify(info));
    </script>
  </body>
</html>
